package com.bwie.controller;
import com.bwie.pojo.Store;
import com.bwie.service.StoreService;
import com.bwie.service.impl.StoreServiceImpl;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import org.springframework.beans.factory.annotation.Autowired;

/**
* (t_store)表控制层
*
* @author xxxxx
*/
@Api(tags = "店铺管理")
@RestController
@RequestMapping("/store/store")
public class StoreController {
/**
* 服务对象
*/
    @Autowired
    private StoreService storeService;

    @ApiOperation("店铺列表")
   @PostMapping("/getStoreList")
    public R getStoreList(@RequestBody PageInfoVo pageInfoVo){

       return storeService.getStoreList(pageInfoVo);
   }

   @ApiOperation("添加店铺")
    @PostMapping("/addStore")
    public R addStore(@RequestBody @Validated Store store){
        return storeService.addStore(store);
   }
}
